@echo off

echo \"config the JDK environment!\


set regpath=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
set evname=JAVA_HOME
set Javapath="C:\Program Files\Java\jdk1.8.0_152"
reg add "%regpath%" /v %evname% /t REG_SZ /d %Javapath% /f

wmic environment where "name='PATH' and username='<system>'" set VariableValue="%Javapath%\bin;%PATH%;"


